<template>
  <PageWrapper contentBackground :contentFullHeight="true">
    <FullCalendar :options="calendarOptions" />
  </PageWrapper>
</template>
<script lang="ts" setup>
  import { PageWrapper } from '/@/components/Page';
  import FullCalendar from '@fullcalendar/vue3';
  import dayGridPlugin from '@fullcalendar/daygrid';
  import timeGridPlugin from '@fullcalendar/timegrid';
  import interactionPlugin from '@fullcalendar/interaction';
  import zhLocale from '@fullcalendar/core/locales/zh-cn';

  const calendarOptions = {
    plugins: [dayGridPlugin, timeGridPlugin, interactionPlugin],
    initialView: 'dayGridMonth',
    height: 800, // 日历高度
    headerToolbar: {
      left: 'prev,next today',
      center: 'title',
      right: 'timeGridDay,timeGridWeek,dayGridMonth',
    },
    handleWindowResize: true, //随浏览器窗口变化
    locale: zhLocale, // 设置成中文显示
  };
</script>
